import request from "../request/request";

export function submitPhoneOrder(orderForm) {
    return request({
        url: '/api/customer/submitPhoneOrder',
        method: 'post',
        data: orderForm
    })
}

export function submitBroadbandOrder(orderForm) {
    return request({
        url: '/api/customer/submitBroadbandOrder',
        method: 'post',
        data: orderForm
    })
}

export function submitTrafficOrder(orderForm) {
    return request({
        url: '/api/customer/submitTrafficOrder',
        method: 'post',
        data: orderForm
    })
}

export function selectMyOrders(username, currentPageNumber, currentPageSize) {
    return request({
        url: '/api/customer/selectMyOrders',
        method: 'get',
        params: {
            username,
            currentPageNumber,
            currentPageSize
        }
    })
}

export function updateCustomerInfo(customerInfoForm) {
    return request({
        url: '/api/customer/updateCustomerInfo',
        method: 'post',
        data: customerInfoForm
    })
}

export function selectCustomerInfo(username) {
    return request({
        url: '/api/customer/selectCustomerInfo',
        method: 'get',
        params: {
            username
        }
    })
}